Skip to content

feat: improved workspace ux and state identity separation. #103

Merged
knightedcodemonkey merged 5 commits intonextfrom
bananas
Apr 30, 2026
Merged

feat: improved workspace ux and state identity separation. #103
knightedcodemonkey merged 5 commits intonextfrom
bananas

Conversation

Copilot AI review requested due to automatic review settings April 29, 2026 21:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors workspace persistence and UX to reduce cross-workspace state contamination, adds explicit scope identity (local vs repository) in stored records, and removes the PR “disconnect” state/action in favor of a simplified PR context model.

Changes:

  • Reworked Workspaces drawer flow (Initialize/New workspace actions, scope-aware filtering, and updated copy).
  • Introduced transaction/load guards and scope markers to prevent stale/late saves and identity mixing across workspace switches.
  • Simplified PR context state machine by removing disconnected (with backward-compatible normalization to inactive) and updated sync/submit flows to persist workspace metadata at explicit commit points.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/styles/ai-controls.css Removes Disconnect styles; adds Workspaces drawer layout styles and hidden-actions behavior.
src/modules/workspace/workspaces-drawer/drawer.js Implements new Workspaces drawer UI state machine and actions (Initialize/New/Open/Remove).
src/modules/workspace/workspace-storage.js Normalizes and persists new workspaceScope field on workspace records.
src/modules/github/pr/editor-sync.js Refactors editor sync to support multiple tab targets by path and returns richer sync results.
src/modules/github/pr/drawer/controller/run-submit.js Persists workspace metadata on submit; tightens push-commit baseline update expectations.
src/modules/github/pr/drawer/controller/repository-form.js Resets form fields when active PR context identity changes (sync key tracking).
src/modules/github/pr/drawer/controller/public-actions.js Removes disconnectActivePrContext public action.
src/modules/github/pr/drawer/controller/create-controller.js Adds state key tracking; aborts pending verify/sync requests on context changes.
src/modules/github/pr/drawer/controller/context-sync.js Dedupes/sorts tab sync targets and keys sync by target paths.
src/modules/github/pr/drawer/common.js Removes disconnected from supported states; normalizes legacy disconnected -> inactive.
src/modules/github/api/editor-content.js Hardens Git Database API commit path for deletes and removes branch-name retry behavior.
src/modules/constants.js Removes obsolete starter-selection prefix constant.
src/modules/app-core/workspace-tabs-renderer.js Updates “Edited” indicator logic to respect synced baseline content.
src/modules/app-core/workspace-sync-controller.js Scope-aware snapshotting; canonical dirty-state derivation; sync targets and reconcile by path.
src/modules/app-core/workspace-scope-fork-actions.js Adds Initialize/New workspace fork actions with scope/key/PR-state semantics.
src/modules/app-core/workspace-save-controller.js Adds load-transaction staleness guard and stricter workspace-key adoption rules.
src/modules/app-core/workspace-pr-session-handoff-controller.js Ensures archived and fresh local sessions set workspaceScope appropriately.
src/modules/app-core/workspace-editor-helpers.js Aligns edited indicator logic and suppresses editor side effects during tab loads.
src/modules/app-core/workspace-controllers-setup.js Introduces workspace load transaction id; wires cancelPendingWorkspaceSave.
src/modules/app-core/workspace-context-controller.js Uses load transaction boundary + cancels pending saves during apply; scope marker hydration.
src/modules/app-core/github-workflows.js Updates Workspaces drawer wiring, initialize/new flows, and post-submit workspace persistence.
src/modules/app-core/github-workflows-setup.js Threads new workspace actions/flush/save functions into workflows setup.
src/modules/app-core/github-pr-context-ui.js Removes Disconnect UI wiring; retains close behavior.
src/modules/app-core/app-bindings-startup.js Stops auto-persisting PR drawer metadata fields on input/blur (moves to explicit commit).
src/index.html Swaps header toggles, removes Disconnect button, and updates Workspaces drawer UI controls.
src/app.js Adds workspaceScopeMarker, integrates scope fork actions, and updates workspace/PR restore semantics.
playwright/helpers/app-test-helpers.ts Stabilizes drawer open/close helpers and adapts bootstrap to Initialize/New flows.
playwright/github-pr-drawer/open-pr-create.spec.ts Adds/updates coverage for scope init/new workspace UX, submit persistence, and branch-exists failures.
playwright/github-pr-drawer/github-pr-drawer.helpers.ts Updates selectors/seed helpers for new labels and adds workspaceScope seeding support.
playwright/github-pr-drawer/active-context-sync.spec.ts Expands sync/push/delete pruning tests and adds regression coverage for partial sync behavior.
playwright/github-pr-drawer/active-context-switch.spec.ts Removes disconnected scenarios; adds stronger workspace-switch integrity and isolation tests.
playwright/github-pr-drawer/active-context-switch-debounce-essential.spec.ts Adds regression suite for debounced-save switching and late-verify isolation.
playwright/github-byot-ai.spec.ts Updates Workspaces startup flow to use Initialize.
docs/workspaces-behavior-algorithm.md Documents the Workspaces drawer behavior/state machine and invariants.
docs/pr-context-storage-matrix.md Updates documented PR context states and baseline invariants post-push.
docs/localstorage-state.md Updates PR context state list and links to Workspaces behavior spec.
docs/issue-99-workspaces-drawer-plan.md Adds implementation plan doc for Issue #99 Workspaces UX changes.
docs/idb-workspace-state.md Documents workspaceScope and post-push baseline/dirty-state invariants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/app-core/workspace-tabs-renderer.js Outdated
Comment thread src/modules/github/pr/editor-sync.js
Comment thread src/index.html
@knightedcodemonkey knightedcodemonkey merged commit ce43c92 into next Apr 30, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch April 30, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants